LESSON

Remote History Provider

Description

A remote History Provider uses the Gateway Network to grab a History Provider from another Gateway on the Gateway Network, allowing you to share historical data between connected Gateways. A remote History Provider works like a normal History Provider in that you query history data into trends and charts, as well as store history data to it. The history data is shared between Gateways without the need for additional database connections, allowing for a more streamlined flow of data, and allowing storage of history data at a central location.

Video recorded using: Ignition 8.1

Transcript

(open in window)

[00:00] A remote history provider allows us to use the history provider of another gateway as well as its corresponding database connection. While it's fairly simple to set up, we first need to make sure that we have at least two gateways. I have this one here named controller, which is installed locally and one installed remotely on another machine. Additionally, we need to ensure that both of them are connected to each other through the gateway network. We then can scroll down on our configure section to the history page under the tag section. As you can see, I currently have one historical tag provider defined. This is because historical tag providers are automatically added whenever we set up a new database connection. This tells us I have a MariaDB connected to this gateway. Let's imagine I didn't have a database connection configured on this gateway. I do have a database connection on my remote gateway, and we can use that one. Because we are making a remote history provider, we don't need to connect this local gateway directly to the database and add another connection to it.

[01:09] We can click the create new historical tag provider link to get started. First we want to select the remote history provider option and click the next button at the bottom. Then we wanna make sure our remote gateway is properly selected. If we have multiple gateways in our gateway network, they would show up here as well. Once the proper gateway is selected, we're going to want to hit the next button at the bottom. We then want to select the proper history provider. The remote gateway's history provider and corresponding database connection is called MariaDB. I'm going to select that one and then click the next button at the bottom. We can give our history provider a unique name and we also should confirm that the remote gateway name and the remote history provider name are both correct. Finally, we need to decide if we want to allow storage on this history provider. If this setting is unchecked, we will only be able to read historical data coming from the history provider of the remote gateway.

[02:07] Keeping it checked allows us to both read and store history to the history provider. I'm going to leave it checked and then click the button at the bottom that says, create new historical tag provider. You may have noticed that right away it says that storage is faulted. This is because by default, the service security settings of any gateway will only allow read access to any of its providers, and because we kept the allow storage setting checked, it is not able to properly store data there because the gateway is preventing it. If you have never created security zones or set up any service security, you may run into this issue. To fix it, we're simply going to go into the remote gateway and go down to the service security within the configure tab. Then we want to go into the security zone that defines our local gateway. I'll scroll down to the history provider access section. You'll notice that the default profile access is set to query only. I'm going to want to query and store data to my history provider, so I'm going to set this setting to query and storage.

[03:08] Once that's set, we're going to scroll down and click the save button and then go back to our local gateway. I can edit the remote history provider and save it with no changes to reinitialize it. You'll notice now it's running just fine. Now that's set up, I can set history on some tags using the remote history provider. Let's go ahead and open up a designer. I can then go and edit this tag named history tag and go down to the history section. When I choose to enable history and select a storage provider you can see my remote gateway database connection is now selectable. I'll go ahead and click on, okay. In addition, I can also set up tag history bindings using that historical provider, say from the data property of this table on my window. I'll go ahead and select it and I'll click on the chain link icon next to its data property. You can see when I go to the tag history binding, my remote gateway provider is there as well.

[04:03] This can be used for things like tables, charts, and even in reports. With remote history providers, I can set up a database at one central location and have all of my historical data funnel through that gateway. This way, I don't have to worry about setting up a database in every single one of my gateways, and I can also view the historical data of any gateway from any other gateway in the network.

You are editing this transcript.

Make any corrections to improve this transcript. We'll review any changes before posting them.